<?PHP
session_start();

require("../conexao/ConectaMysql.class.php");
require("../conexao/ControleAcesso.class.php");
require("gerencia_relatorio.class.php");
require("gerencia_analise.class.php");

ControleAcesso::verificaSessao();
$conexao = new ConectaMysql();

$gerenciaAnalise = new GerenciaAnalise($conexao);
$gerenciaRelatorio = new GerenciaRelatorio($conexao);

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Setor</title>
<link href="../estrutura/css/datagrid/light/estilo.css" rel="stylesheet" type="text/css" media="screen" />
<link href="../estrutura/css/estruturaTotal.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<div class="headerModulo"><img src="../estrutura/imagens/ico_confirmacao.png" alt="" /> &nbsp;Registros</div>
<div class="filtros" style="display: block;">
 <form id="FORMrelatorio" method="post" action="gerar_relatorio.php" name="FORMrelatorio" target="_blank">
      <fieldset>
		<p class="linha">&nbsp;</p>
		<table width="253" border="0">
		  <tr>
		    <td width="116" height="39">
                <span class="linha">
                    <label class="preField" for="analise"> Análise por:<br />
                      <br />
                    </label>
                </span>
            </td>
		    <td width="127">
                <span class="linha">
                  <select id="ANALISEid" name="ANALISEid"  class="caixa_texto">
						<?php 
                        $result_analise = $gerenciaAnalise->selectAnalise();
                        foreach ($result_analise as $row_analise){
							$ANALISEid 		= $row_analise['ANALISEid'];
							$ANALISEdescricao = $row_analise['ANALISEdescricao'];
							echo "<option value=\"$ANALISEid\">$ANALISEdescricao</option>";  
                        }
                        ?>
                    </select>
                </span>
            </td>
	      </tr>
		  <tr>
		    <td height="68">
                <span class="linha">
                	<label class="preField" for="relatorio"> Relatórios Disponíveis:</label>
                </span>
            </td>
            <td>
                <span class="linha">
                    <select id="RELtipo" name="RELtipo"  class="caixa_texto" >
                        <?php 
                        $result_relatorio = $gerenciaRelatorio->selectRelatorio();
                        foreach ($result_relatorio as $row_relatorio){
                            $RELtipo = $row_relatorio['RELtipo'];
                            $RELdescricao = $row_relatorio['RELdescricao'];
                            echo "<option value=\"$RELtipo\">$RELdescricao</option>";  
                        }
                        ?>
                    </select>&nbsp;
                    <input name="buscar" type="submit" id="buscar" value="Buscar" class="caixa_texto" />
                </span>
            </td>
	      </tr>
	    </table>
		<p>&nbsp;</p>
    </fieldset>
 </form>
</div>
</body>
</html>
